package com.zcf.service.Impl;

import com.zcf.dao.UserDao;
import com.zcf.domain.User;
import com.zcf.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 11481 on 2017/2/27.
 */
@Service
@Transactional
public class UserServiceImpl implements UserService{
    @Resource
    private UserDao userDao;
    @Override
    public boolean findByName(String username) {
        return userDao.findByName(username);
    }

    @Override
    public void register(String username, String password) {
        userDao.register(username,password);
    }

    @Override
    public boolean findByUser(String username, String password) {
        return userDao.findByUser(username,password);
    }

    @Override
    public List<User> findByList() {
        return userDao.findByAll();
    }
}
